Skip to content

Add coverage for ForeignMemoryWriterFactory#11772

Merged
amarziali merged 2 commits into
masterfrom
andrea.marziali/cov2
Jun 29, 2026
Merged

Add coverage for ForeignMemoryWriterFactory#11772
amarziali merged 2 commits into
masterfrom
andrea.marziali/cov2

Conversation

@amarziali

Copy link
Copy Markdown
Contributor

What Does This Do

Add coverage for ForeignMemoryWriterFactoryTest. It needs static mocking for the Os/SysProp classes

Coverage is 100% on method, class, branches. 83% on lines

Motivation

Additional Notes

Contributor Checklist

  • Format the title according to the contribution guidelines
  • Assign the type: and (comp: or inst:) labels in addition to any other useful labels
  • Avoid using close, fix, or any linking keywords when referencing an issue
    Use solves instead, and assign the PR milestone to the issue
  • Update the CODEOWNERS file on source file addition, migration, or deletion
  • Update public documentation with any new configuration flags or behaviors
  • Add your completed PR to the merge queue by commenting /merge. You can also:
    • Customize the commit message associated with the merge with /merge --commit-message "..."
    • Remove your PR from the merge queue with /merge -c
    • Skip all merge queue checks with /merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-level (note: the PR still needs to be mergeable, this will only skip the pre-merge build)
    • Get more information in this doc

Jira ticket: [PROJ-IDENT]

@amarziali amarziali requested a review from a team as a code owner June 29, 2026 13:16
@amarziali amarziali requested a review from mhlidd June 29, 2026 13:16
@amarziali amarziali added type: enhancement Enhancements and improvements comp: testing Testing tag: no release notes Changes to exclude from release notes labels Jun 29, 2026
@amarziali amarziali enabled auto-merge June 29, 2026 13:18

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba64bfbc89

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -0,0 +1 @@
mock-maker-inline No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❔ question: ‏Will it impact other mocks from the module too?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

As an additional note this mockmaker is the default since mockito 5.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that for OperatingSystem/SystemProperties and CO, we should work for a better testability interop (or at least design the class that use it to receive a mock) if we want to avoid mocking statically

@amarziali amarziali disabled auto-merge June 29, 2026 13:22
@amarziali amarziali enabled auto-merge June 29, 2026 13:32
@amarziali amarziali disabled auto-merge June 29, 2026 14:51
@amarziali amarziali merged commit 52c3c44 into master Jun 29, 2026
579 of 581 checks passed
@amarziali amarziali deleted the andrea.marziali/cov2 branch June 29, 2026 14:51
@github-actions github-actions Bot added this to the 1.64.0 milestone Jun 29, 2026
TophrC-dd pushed a commit that referenced this pull request Jun 29, 2026
* Add coverage for ForeignMemoryWriterFactoryTest

* test on 22+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: testing Testing tag: no release notes Changes to exclude from release notes type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants